Math for Assembly
Submit this sheet with all calculations and all supporting work.
- Given the following segment:offset addresses, find the physical address.
Formula:physical address=(segment×16)+offset(a) 02C1:074F
02C10+074F0335F(b) 15C5:4CCF
15C50+4CCF1A91F
- Given the following physical addresses and offset values, calculate the segment value.
RearrangeFormula:(physical address− offset)/16=segment(a) Physical Address C4AD6, Offset 8AB6
C4AD6−8AB6BC020 Divided by E means physical address is BC02(b) Physical Address 1B0DC, Offset 007C
1B0DC−007C1B060 Divided by E means physical address is 1B06
- Convert the following decimal reals to IEEE Single Precision binary.
(a) -9.8
The number is negative number therefore signed with 1
9 in binary is 1001
0.8×2=1.6=10.6×2=1.2=10.2×2=0.4=00.4×2=0.8=00.8×2=1.6=10.8=0.1100110011001100...In normalized form 1.00101×23
Exponent of 3 needs to add 127 to get 130 which in binary is 10000010
Thusly -9.8 in floating point binary is 1 10000010 0010 1000 0000 0000 0000 000
(b) 12.32
The number is positive number therefore signed with 0
12 In binary the number is 1100
0.32×2=0.64=00.64×2=1.28=10.28×2=0.56=00.56×2=1.12=10.12×2=0.24=00.24×2=0.48=00.48×2=0.96=00.96×2=1.92=10.92×2=1.84=10.84×2=1.68=10.68×2=1.36=10.36×2=0.72=00.72×2=1.44=10.44×2=0.88=00.88×2=1.76=10.76×2=1.52=10.52×2=1.04=10.04×2=0.08=00.08×2=0.16=00.16×2=0.32=00.32×2=0.64=00.32=0.010100011110101110000...Exponent of 3 needs to add 127 to get 130 which in binary is 10000010
In normalized form 1.100010100011110101110000×23
Thusly 12.32 in floating point binary is 0 10000010 1000 1010 0011 11010 1110 000
- Convert the following IEEE Single Precision binary numbers to decimal real values.
(a) 1 01111100 1000 0001 1000 1011 1011 100
The number is signed with 1 therefore it is a negative number
Exponent is 01111100 which is
2664+25+32+24+16+23+8+22+4=124
this is biased unbiased is 124−127=−3
so 1.1000 0001 1000 1011 1011 100×2−30.0011 0000 0011 0001 0111 0111 00 Denormalized binary form
2−4+2−9+2−8+2−16+2−18+2−19+2−20+2−22+2−23+2−241 01111100 1000 0001 1000 1011 1011 100in Decimal Form is−0.1882547736168(b) 0 10001100 0000 1011 1011 1011 1011 101
The number is signed with 0 therefore it is a positive number
Exponent is 10001100 which is
27128+23+8 +22+4=140
this is biased unbiased is 140−127=13
so 1.0000 1011 1011 1011 1011 101×21310 0001 0111 0111 . 0111 0111 01 Denormalized binary form
213+28+26+25+24+22+21+20+2−2+2−3+2−4+2−6+2−7+2−8+2−100 10001100 0000 1011 1011 1011 1011 101in Decimal Form is8567.2783203125